# include <bits/stdc++.h>
using namespace std;
int a[10], ans, h;
int main() { 
# ifndef LOCAL
    freopen("apple.in", "r", stdin);
    freopen("apple.out", "w", stdout);
# endif
    for(int i = 0; i < 10; i++) 
        cin >> a[i];
    cin >> h;
    h += 30;
    for(int i = 0; i < 10; i++) 
        if(a[i] <= h) ans++;
    printf("%d\n", ans);
}
